﻿<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="add2nums._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h1>Add Two Numbers</h1>
        <table cellpadding="0" cellspacing="0" class="myTable">
            <tr>
                <td class="myLabel">Number 1</td>
                <td class="myTextbox">
                    <asp:TextBox ID="tb_num1" runat="server" Height="30px" Width="150px"></asp:TextBox>
                </td>
                <td class="myValidation">
                    &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="tb_num1" ErrorMessage="Only numeric values are allowed" 
                        ForeColor="Red" ValidationExpression="^[+-]?\d+(\.\d+)?$"></asp:RegularExpressionValidator>
                    &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="tb_num1" ErrorMessage="Please do not leave blank" 
                        ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="myLabel">Number 2</td>
                <td class="myTextbox">
                    <asp:TextBox ID="tb_num2" runat="server" Height="30px" Width="150px"></asp:TextBox>
                </td>
                <td class="myValidation">
                    &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                        ControlToValidate="tb_num2" ErrorMessage="Only numeric values are allowed" 
                        ForeColor="Red" ValidationExpression="^[+-]?\d+(\.\d+)?$"></asp:RegularExpressionValidator>
                    &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="tb_num2" ErrorMessage="Please do not leave blank" 
                        ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>&nbsp;</td>
                <td class="myButton">
                    <asp:Button ID="btn_add" runat="server" Text="ADD NUMBERS" BackColor="#333333" 
                        CssClass="addButton" Font-Bold="True" ForeColor="White" Height="30px" 
                        Width="150px" />
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="myLabel">Answer</td>
                <td class="myAnswer">
                    <asp:Label ID="lbl_answer" runat="server" CssClass="myAnswer" Font-Bold="True" 
                        ForeColor="Green"></asp:Label>
                </td>
                <td>&nbsp;</td>
            </tr>
        </table>
</asp:Content>
